<?php
/* @var $model backend\models\Admin */
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Html;
use yii\captcha\Captcha;
use yii\helpers\VarDumper;

$this->title = "登 录";

$this->params['breadcrumbs'][] = ['label'=>'管理员','url'=>['manager/index']];

//$this->params['breadcrumbs'][]=$this->title;
$this->params['breadcrumbs'][]=Yii::$app->controller->action->id;
//VarDumper::dump((Yii::$app->controller->action),10,true);

$this->registerCss('div.required label:after{content:" *";color:red;}');

echo "<h1>".Html::encode($this->title)."</h1>";

//echo "<p>用户名登录</p>";

$form = ActiveForm::begin();

//echo Html::button('用户名登录');

echo $form->field($model,'username');

echo $form->field($model,'password')->passwordInput();

echo $form->field($model,'verifyCode')->widget(Captcha::className(),[
    'captchaAction'=>'manager/captcha',
    'imageOptions'=>[
        'alt'=>'验证码',
        'title'=>'换一个',
        'style'=>'cursor:pointer;margin-left:25px',
    ],
]);

echo $form->field($model,'rememberMe')->checkbox();
echo '<div style="color:#999;margin:1em 0">';
echo 'If you forgot your password you can  '.Html::a('reset it', ['manager/request-password-reset']).'</div>';


echo Html::submitButton('登&nbsp;&nbsp;&nbsp;&nbsp;录',['class'=>'btn btn-lg  btn-block']);

ActiveForm::end();